package com.ypc.webdemo.controller.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.domain.ExampleMatcher;

/**
 * @author yinpengcheng
 * @Date 2023/7/24
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class PluginInDto extends InDto {
    private String name;
    @ApiModelProperty(allowableValues = "install,uninstall")
    private String status;

    public ExampleMatcher getExampleMatcher() {
        return ExampleMatcher.matching()
                .withMatcher("name", ExampleMatcher.GenericPropertyMatchers.contains())
                .withMatcher("status", ExampleMatcher.GenericPropertyMatchers.caseSensitive());
    }
}
